package com.example.hw1.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Student {

    @Size(min=6,message="Name must be at least 5 characters long")
    private String name;

    @NotBlank(message = "学号不能为空")
    private String id;

    @NotBlank(message = "年级不能为空")
    private String grade;

    @NotBlank(message = "专业不能为空")
    private String profession;

    @NotBlank(message = "学院不能为空")
    private String college;

    private List<Course> courseList;
}
